import request from '@/utils/request'

export function login(data) {
  return request({
    method: 'POST',
    url: '/sys/login',
    data
  })
}

/**
 *
 * @returns Promise
 */
export function getInfo() {
  return request({
    method: 'POST',
    url: '/sys/profile'
  })
}

/**
 *
 * @param 用户 id
 * @returns
 */
export function getUserDetail(id) {
  return request({
    method: 'GET',
    url: `/sys/user/${id}`
  })
}

export function logout() { }
